import { createApp } from 'vue'
import App from './App.vue'
import router from './router/index.js'
import '@/styles/index.scss' // 引入基本样式文件
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css' //引入element-plus样式文件
import {createPinia} from 'pinia' //引入pinia
import '@/router/permisssion.js'//引入路由守卫
//引入全部element-plus的图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue' 
import i18n from './i18n/index.js'
const app = createApp(App)
// 循环定义的图标并进行逐个注册成组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(router).use(i18n).use(ElementPlus).use(createPinia()).mount('#app')
